#ifndef USER_H
#define USER_H

#include <string>
#include <fstream>
#include <iostream>
#include <cctype>

class AccountManager {
private:
    const std::string dbFile = "accounts.db";
    const int caesarShift = 5;

    std::string encryptPassword(const std::string& password);
    std::string decryptPassword(const std::string& encrypted);
    void saveAccount(const std::string& username, const std::string& encryptedPassword);
    bool findUser(const std::string& username, std::string& outEncryptedPassword);

public:
    bool registerUser(std::string username, std::string password);
    bool login(std::string username, std::string password);
};

#endif // USER_H
